package com.flick.order.services;

import com.flick.common.CommonPage;
import com.flick.common.Result;
import com.flick.fein.PaymentFein;
import com.flick.vo.payment.OrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {

    @Autowired
    PaymentFein fein;

    public List<OrderVo> list(){
        List<OrderVo> list = (List<OrderVo>)fein.list().getData();
        for (OrderVo orderVo: list) {
            System.out.println(orderVo.getOrderNo());
        }
        return list;
    }

    public CommonPage<OrderVo> page(Integer page, Integer size){
        Result result = fein.page(page,size);
        return (CommonPage<OrderVo>) result.getData();
    }

}
